
package com.chaos.system.service.third;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "amapService", url = "https://restapi.amap.com/v3")
public interface AmapThirdFeign {
    @GetMapping("/geocode/geo")
    JSONObject geo(
            @RequestParam("city") String city,
            @RequestParam("address") String address,
            @RequestParam("key") String key
    );

    @GetMapping("/geocode/regeo")
    JSONObject regeo(
            @RequestParam("location") String location,
            @RequestParam("key") String key,
            @RequestParam("radius") int radius,
            @RequestParam("extensions") String extensions
    );
}